<template>
  <div>
    <el-table :data="this.tableData" height="525">
      <el-table-column
        v-for="(item, index) in tableLabel"
        :key="index"
        :prop="item.prop"
        :width="item.width"
        :label="item.label"
      >
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        // 表数据
        {
          id: 1,
          date: "2018-07-24",
          sales: 50,
          sale: 137597.76,
          const: 102203.71,
          profit: 35394.05,
        },
        {
          id: 2,
          date: "2018-07-24",
          sales: 70,
          sale: 137597.76,
          const: 102203.71,
          profit: 35394.05,
        },
        {
          id: 3,
          date: "2018-07-24",
          sales: 80,
          sale: 137597.76,
          const: 102203.71,
          profit: 35394.05,
        }
      ],
      tableLabel: [
        // 表头数据
        { label: "id", width: "60", prop: "id" },
        { label: "日期", width: "", prop: "date" },
        { label: "销售量", width: "", prop: "sales" },
        { label: "销售额", width: "", prop: "sale" },
        { label: "成本", width: "", prop: "const" },
        { label: "利润", width: "", prop: "profit" },
      ],
    };
  },
};
</script>

<style>
</style>